#pragma once

#include <boostext/util/make_shared.hpp>
#include <engine.core/Reflection.hpp>
#include <engine.core/noncopyable.hpp>

#include "exports.hpp"




namespace Engine
{
	namespace Video
	{
		/**
		 * This is the abstract buffer class.
		 * Most things can be thought of a buffer, but this one in particular refers to a buffer
		 * of some object that resides in video memory. It may be something abstract like a Mesh
		 * or a ConstantsBuffer and can be updated, depending on the implementation and usage.
		 */
		class ENGINE_VIDEO_API Buffer
			: public noncopyable
		{
		public:

			enum Type
			{
				Static,
				SemiDynamic,
				Dynamic,
			};

		public:

			SHARED(Buffer);



			/**
			 * Get the usage mode of this buffer.
			 * Defines if this buffer is static (ie. may not changed),
			 * SemiDynamic (may be changed, but doesn't happen frequently) or
			 * Dynamic (may be changed, and happens often).
			 */
			virtual Type usage() const = 0;

			/**
			 * Get the reflection data of this buffer.
			 * It defines the data-layout of an element of this buffer.
			 */
			virtual StaticReflection reflect() const = 0;
		};
		///////////////////////////////////////////////////////////////////////////////////////////
	}
	///////////////////////////////////////////////////////////////////////////////////////////////
}
///////////////////////////////////////////////////////////////////////////////////////////////////
